<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>跟踪修改页面</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
<style>
.layui-btn:not(.layui-btn-lg ):not(.layui-btn-sm):not(.layui-btn-xs) {
	height: 34px;
	line-height: 34px;
	padding: 0 8px;
}

.layui-form-label {
	width: 100px;
}
</style>
</head>
<body>
	<form class="layui-form" action="">
		<div class="layui-form-item" style="margin-top: 20px;"
			onsubmit="false">
			<div class="layui-form-item" hidden="hidden">
				<label class="layui-form-label">跟踪ID:</label>
				<div class="layui-input-inline" style="width: 240px;">
					<input type="text" id="trackid" name="trackid" class="layui-input"
						readonly="true">
				</div>
			</div>
			 <div class="layui-row">
    <div class="layui-col-xs6">
      <div class="layui-form-item">
				<label class="layui-form-label">咨询师姓名:</label>
				<div class="layui-input-inline" style="width: 240px;">
					<input type="text" id="username" name="username" required=""
						lay-verify="required|username" autocomplete="off"
						class="layui-input" readonly="true">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">学生姓名:</label>
				<div class="layui-input-inline" style="width: 240px;">
					<input type="text" id="stuname" name="stuname" required=""
						lay-verify="required|stuname" autocomplete="off"
						class="layui-input" readonly="true">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">跟踪开始日期:</label>
				<div class="layui-input-inline" style="width: 240px;">
					<input type="text" id="trackdatebegin" name="trackdatebegin"
						required="" autocomplete="off" class="layui-input" readonly="true">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">跟踪结束日期:</label>
				<div class="layui-input-inline" style="width: 240px;">
					<input type="text" id="trackdateend" name="trackdateend"
						required="" autocomplete="off" class="layui-input" readonly="true">
				</div>
			</div>
    </div>
    <div class="layui-col-xs6">
     <div class="layui-form-item">
				<label class="layui-form-label">跟踪类型:</label>
				<div class="layui-input-inline" style="width: 240px;">
					<input type="text" id="tracktype" name="tracktype" required=""
						autocomplete="off" class="layui-input" readonly="true">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">跟踪状态:</label>
				<div class="layui-input-inline" style="width: 240px;">
					<input type="text" id="trackstate" name="trackstate" value="" required=""
						autocomplete="off" class="layui-input" readonly="true">
				</div>
				
			</div>
	
		<div class="layui-form-item">
			<label class="layui-form-label">跟踪内容:</label>
			<div class="layui-input-inline" style="width: 240px;">
				<textarea id="trackcontent" name="trackcontent" required=""
					class="layui-textarea" readonly="true"></textarea>
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label required">回访情况:</label>
			
			
			<div class="layui-input-inline" style="width: 240px;">
					<input type="text" id="IsReturnVisit" name="IsReturnVisit" value="" required=""
						autocomplete="off" class="layui-input" readonly="true">
				</div>
			
		</div>
    </div>
  </div>
			
			
		</div>
		<!-- <div class="layui-btn-container" style="text-align: center;">
			<button class="layui-btn" lay-filter="trackEditBtu" lay-submit="">
				修改</button>
		</div> -->

	</form>
	<script type="text/javascript" src="layui/layui.js"></script>
	<script type="text/javascript" src="lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>
	<script src="js/Global.js" type="text/javascript" charset="utf-8"></script>
	<!-- 跟踪详情页面根据回显 重新赋值 判断汉字固定，颜色设置 -->
<script type="text/javascript">
setTimeout(function(){
	if($("#trackstate").val()==1){
		$("#trackstate").val("已完成");
		$("#trackstate").css("color",'blue');
	}else if($("#trackstate").val()==2){
		$("#trackstate").val("跟进中");
		$("#trackstate").css("color",'red');
	}else if($("#trackstate").val()==3){
		$("#trackstate").val("未完成");
		$("#trackstate").css("color",'gray');
	}
},100)
	
	setTimeout(function(){
	if($("#IsReturnVisit").val()==1){
		$("#IsReturnVisit").val("已回访");
		$("#IsReturnVisit").css("color",'red');
	}else if($("#IsReturnVisit").val()==2){
		$("#IsReturnVisit").val("未回访");
		$("#IsReturnVisit").css("color",'blue');
	}
},100)
</script>
	<!-- <script>
		//加载了layui的form模块
		layui.use([ 'form', 'table', 'laydate' ],
				function() { //如果只加载一个模块，可以不填数组。如：layui.use('form')
					form = layui.form, table = layui.table;//获取table模块
					var laydate = layui.laydate;
					var $ = layui.jquery;
					layer = layui.layer,
					$ = layui.$;
				form.verify({
				  username: function(value, item){ //value：表单的值、item：表单的DOM对象
				    if(!new RegExp("^[a-zA-Z0-9_\u4e00-\u9fa5\\s·]+$").test(value)){
				      return '用户名不能有特殊字符';
				    }
				    if(/(^\_)|(\__)|(\_+$)/.test(value)){
				      return '用户名首尾不能出现下划线\'_\'';
				    }
				    if(/^\d+\d+\d$/.test(value)){
			      		return '用户名不能全为数字';
			    	}
			    
				    //如果不想自动弹出默认提示框，可以直接返回 true，这时你可以通过其他任意方式提示（v2.5.7 新增）
				    if(value === 'name'||value === 'username'||value === 'sb'){
				      return '用户名不能为敏感词';
				    }
				  }
				  
				  //我们既支持上述函数式的方式，也支持下述数组的形式
				  //数组的两个值分别代表：[正则匹配、匹配不符时的提示文字]
				  ,pass: [
				    /^[\S]{6,12}$/
				    ,'密码必须6到12位，且不能出现空格'
				  ]
				});
			//监听提交
			form.on('submit(trackEditBtu)', function(data) {
				var d = data.field; //表单中的数据，定义一个对象来接收
				d.method = "update";
				//通过ajax向数据库提交数据了
				console.log(d); //提交之前的一个数据验证、通过打印的方式先手动的去判断一下这个数据
				var url = globalData.server+'public/updateTrack';
				$.post(url, data.field, function(data) {
					if(data.count > 0) {
						var iframeIndex = parent.layer.getFrameIndex(window.name);
						parent.layer.close(iframeIndex);
					}
				}, "json");
				return false;
			});
			
			
			layui.use('laydate', function() {
				var laydate = layui.laydate;
				//同时绑定多个时间选择器
				laydate.render({
					elem: '#trackdatebegin',
					type: 'datetime'
				});
				laydate.render({
					elem: '#trackdateend',
					type: 'datetime'
				});
			});
			
		});
		
	</script> -->
</body>
</html>